package com.exchange.Controller;

import com.exchange.b.a;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class f
  implements Iterator<a>
{
  private ArrayList<a> a;
  private int b = 0;

  public f(List<a> paramList)
  {
    this.a = new ArrayList();
    this.a.addAll(paramList);
  }

  public int a()
  {
    return this.b;
  }

  public a a(int paramInt)
  {
    a locala;
    if (this.a != null)
      locala = (a)this.a.get(paramInt);
    while (true)
    {
      return locala;
      locala = null;
    }
  }

  public void a(List<a> paramList)
  {
    if (this.a == null)
      this.a = new ArrayList();
    this.a.addAll(paramList);
  }

  public int b()
  {
    int i;
    if (this.a == null)
      i = 0;
    while (true)
    {
      return i;
      i = this.a.size();
    }
  }

  public a c()
  {
    a locala;
    if (hasNext())
    {
      ArrayList localArrayList = this.a;
      int i = this.b;
      this.b = (i + 1);
      locala = (a)localArrayList.get(i);
    }
    while (true)
    {
      return locala;
      locala = null;
    }
  }

  public a d()
  {
    a locala;
    if (b() == 0)
      locala = null;
    while (true)
    {
      return locala;
      this.b %= b();
      ArrayList localArrayList = this.a;
      int i = this.b;
      this.b = (i + 1);
      locala = (a)localArrayList.get(i);
    }
  }

  public a e()
  {
    a locala;
    if ((this.b > 0) && (this.b <= b()))
      locala = (a)this.a.get(this.b - 1);
    while (true)
    {
      return locala;
      locala = null;
    }
  }

  public boolean hasNext()
  {
    int i;
    if ((this.a != null) && (this.b >= 0) && (this.b < this.a.size()))
      i = 1;
    while (true)
    {
      return i;
      i = 0;
    }
  }

  public void remove()
  {
    if ((this.b > 0) && (this.b <= b()))
      this.a.remove(this.b - 1);
  }
}